home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / MaximaVolley / Maxima-Volley.jar / MaximaVolley$Player.class (.txt) < prev    next >
Encoding:
Java Class File  |  2002-01-31  |  1.2 KB  |  50 lines

  1. class MaximaVolley$Player extends Thread {
  2.    public final int WIDTH;
  3.    public final int HEIGHT;
  4.    // $FF: renamed from: x int
  5.    int field_0;
  6.    // $FF: renamed from: y int
  7.    int field_1;
  8.    // $FF: synthetic field
  9.    private final MaximaVolley this$0;
  10.  
  11.    public MaximaVolley$Player(MaximaVolley var1) {
  12.       this.this$0 = var1;
  13.       this.WIDTH = MaximaVolley.access$100(this.this$0).getWidth() / 8;
  14.       this.HEIGHT = MaximaVolley.access$100(this.this$0).getHeight() / 8;
  15.       this.setUp(1);
  16.    }
  17.  
  18.    void setUp(int var1) {
  19.       if (var1 == 1) {
  20.          this.field_0 = MaximaVolley.access$100(this.this$0).getWidth() / 4 - this.WIDTH / 2 - 4;
  21.          this.field_1 = MaximaVolley.access$100(this.this$0).getHeight() - this.HEIGHT - 5;
  22.       } else {
  23.          this.field_0 = MaximaVolley.access$100(this.this$0).getWidth() - MaximaVolley.access$100(this.this$0).getWidth() / 4 - this.WIDTH / 2 + 4;
  24.          this.field_1 = MaximaVolley.access$100(this.this$0).getHeight() - this.HEIGHT - 5;
  25.       }
  26.  
  27.    }
  28.  
  29.    public void run() {
  30.       while(!MaximaVolley.access$400(this.this$0)) {
  31.          try {
  32.             Thread.sleep(10L);
  33.          } catch (Exception var2) {
  34.             return;
  35.          }
  36.       }
  37.  
  38.    }
  39.  
  40.    void move(int var1) {
  41.       int var2 = this.field_0;
  42.       int var3 = this.field_0 + var1;
  43.       if (var3 + this.WIDTH <= MaximaVolley.access$100(this.this$0).getWidth() && var3 >= 0) {
  44.          this.field_0 = var3;
  45.       }
  46.  
  47.       MaximaVolley.access$100(this.this$0).repaint(Math.min(var2, this.field_0), this.field_1, Math.abs(this.field_0 - var2) + this.WIDTH + 1, this.HEIGHT + 4);
  48.    }
  49. }
  50.